home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1986 July / 1986-07.d64 / math worksheet (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  2KB  |  62 lines

  1. 10 rem ** math worksheet **
  2. 20 poke 53280,0:poke 53281,0:goto 50
  3. 30 rem ** position cursor **
  4. 40 poke 781,r:poke 782,c:poke 783,0:sys 65520:return
  5. 50 print"[147]":f$="worksheet":c=8
  6. 60 r=2:gosub 40:print"s[158][146]ubtraction "f$
  7. 70 r=4:gosub 40:print"a[158][146]ddition "f$
  8. 80 r=6:gosub 40:print"m[158][146]ultiplication "f$
  9. 90 print"  press highlighted key[158][146] of your choice
  10. 100 [161] k$:[139] k$[178]"s" [167] s$[178]"-":[137] 150
  11. 110 [139] k$[178]"a" [167] s$[178]"+":[137] 150
  12. 120 [139] k$[178]"m" [167] s$[178]"x":[137] 150
  13. 130 [137] 100
  14. 150 [134] a$(100),p%(100):cr$[178][199](13):j[178]0:z[178]0
  15. 170 [153]"load"[166]13)" math worksheet "
  16. 180 r[178]2:c[178]12:[141] 40:[153]" creating problems sys"
  17. 190 [143] ** create 100 strings a$(0)-a$(99) **
  18. 200 [129] i[178]0 [164] 9:n$(i)[178][201]([196](i),1):[130] i
  19. 210 i[178]0
  20. 220 [129] k[178]0 [164] 9:[129] l[178]0 [164] 9
  21. 240 [139] s$[178]"-" [175] [197](n$(k)) [179] [197](n$(l)) [167] a$(i)[178]n$(l)[170]n$(k):[137] 260
  22. 250 a$(i) [178] n$(k)[170]n$(l)
  23. 260 [153]" "a$(i)" ";:i[178]i[170]1:[130] l,k
  24. 300 r[178]2:c[178]11:[141] 40:[153]" randomize problems "
  25. 330 [139] j[177]99 [167] 490
  26. 340 x[178][181]([187](0)[172]99):[139] j[178]0 [167] p%(j)[178]x:[141] 470:j[178]j[170]1:[137] 340
  27. 360 i[178]0
  28. 370 [139] p%(i)[178]x [167] 420
  29. 380 i[178]i[170]1
  30. 390 [139] i[178]j [167] p%(j)[178]x:[141] 470:j[178]j[170]1:[137] 330
  31. 400 [137] 370
  32. 410 [143] ** find unused pointer **
  33. 420 i[178]0
  34. 430 [139] p%(i)[178]z [167] z[178]z[170]1:[137] 420
  35. 440 i[178]i[170]1
  36. 450 [139] i[178]j [167] p%(j)[178]z:[141] 470:j[178]j[170]1:[137] 330
  37. 460 [137] 430
  38. 470 [153]" "a$(p%(j))" ";:[142]
  39. 480 [143] ** print worksheet **
  40. 490 r[178]16:c[178]3:[141] 40:[153]"sysposition printhead about 1/4 inch"
  41. 500 r[178]17:c[178]8:[141] 40:[153]"below paper perforation."
  42. 510 r[178]18:c[178]3:[141] 40:[153]"press & hold qwaitsys to abort printing"
  43. 520 r[178]20:c[178]8:[141] 40:[153]"press any keysyswait to start "
  44. 530 [161] k$:[139] k$[178]"" [167] 530
  45. 540 [159] 4,4
  46. 550 [152]4,[199](14)
  47. 560 [152]4,"             math worksheet":[152]4,:[152]4,
  48. 570 [152]4,"nametotototototototototototototototototototototototototototototo":[152]4,
  49. 580 [129] i[178]0 [164] 90 [169] 10
  50. 590 [129] j[178]i [164] 9[170]i:[152]4,"  ";[200](a$(p%(j)),1)" ";:[130] j:[152]4,cr$;
  51. 600 [129] j[178]i [164] 9[170]i:[152]4," "s$;[201](a$(p%(j)),1)" ";:[130] j:[152]4,cr$;
  52. 610 [129] j[178]i [164] 9[170]i:[152]4,"  tab( ";:[130] j
  53. 620 [129] l[178]1 [164] 4:[152]4,:[130] l
  54. 630 [161] k$:[139] k$[178]"q" [167] [156]:[137] 50
  55. 640 [130] i
  56. 650 [160] 4
  57. 660 r[178]20:c[178]5:[141] 40:[153]"press  r waitsys to do another worksheet"
  58. 670 r[178]21:c[178]5:[141] 40:[153]"press  q waitsys to quit
  59. 680 get k$:if k$="r" then clr:goto 50
  60. 690 if k$="q" then end
  61. 700 goto 680
  62.